package com.sunwayhorizo.health.hl7.rim;

import com.sunwayhorizo.health.common.DataTypeUtil;
import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.datatypes.ST;
import com.sunwayhorizo.health.hl7.factories.ReferenceModifier;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.NamedQuery;

import org.jboss.seam.annotations.Name;


@Name("ContextStructure")
@Entity
@NamedQuery(name = "ContextStructure.findAll", query = "select o from ContextStructure o")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("CONST")
public class ContextStructure extends Act implements Serializable {
    
//    public ST LocalId;
    
    public ContextStructure() throws Hl7Exception {
    }
    
    public ContextStructure(ReferenceModifier referencemodifier)
    {
        super(referencemodifier);
    }
    
    public void setLocalId(ST LocalId) {
        this.setCsLocalId(LocalId.toString());
    }

    public ST getLocalId() throws Hl7Exception {
        return DataTypeUtil.getST(this.getCsLocalId());
    }
    
    //ContextStructure
    @Column(name = "CS_LOCAL_ID")    private String csLocalId;
        
    private String getCsLocalId() {
        return csLocalId;
    }

    private void setCsLocalId(String csLocalId) {
        this.csLocalId = csLocalId;
    }


}
